const documentsManagement = {
  name: "运单管理",
  path: "documents",
  content: [{
    name: "运单添加",
    path: "docAdd"
  },
  {
    name: "运单详情",
    path: "docDetails/0"
  },
  {
    name: "运单查询",
    path: "docSelect"
  }]
}
const storeManagement = {
  name: "仓储管理",
  path: "store",
  content: [{
    name: "仓储总览",
    path: "storePandect"
  },
  {
    name: "中转装车",
    path: "storeShipment"
  },
  {
    name: "中转货物接收",
    path: "transitReceive"
  },
  {
    name: "配送装车",
    path: "storeDispatch"
  },
  {
    name: "运单签收",
    path: "documentSign"
  }]
  
}
const employeeManagement = {
  name: "员工管理",
  path: "employee",
  content: [{
    name: "员工电话查询",
    path: "empSelTel"
  },{
    name: "员工添加",
    path: "empAdd"
  }]
}
const trucksManagement = {
  name: "车辆管理",
  path: "trucks",
  content: [{
    name: "车辆总览(司机绑定)",
    path: "trucksPandect"
  },
  {
    name: "添加车辆",
    path: "trucksAdd"
  },
  {
    name: "车辆调度",
    path: "truckDispatch"
  },{
    name: "车辆调度记录",
    path: "dispatchRecord"
  }]
}
export default {
  state: {
    // 总导航
    navigation: [
      documentsManagement,
      storeManagement,
      trucksManagement,
      employeeManagement
    ],
    // 导航活跃数组
    activeNav: {
      name: "首页",
      path: 'home',
      content: []
    },
    // 导航活跃标签
    activeTag: {
      name: "首页",
      path: 'home',
      fullPath: null
    }
  },
  mutations: {
    updActiveNav (state,payload) {
      state.activeNav = payload
    },
    updActiveTag (state,payload) {
      if(payload.path == state.activeTag.path) {
        return false
      }
      state.activeTag = payload
    }
  }
}